﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" Runat="Server">


   
    <asp:ListView id="computers" runat="server">
        <LayoutTemplate>
        <table>
            <tr>
                <th></th>
                <th>Machine</th>
                <th>State</th>
                <th>Uptime</th>
            </tr>
        
            <asp:PlaceHolder runat="server" ID="itemPlaceholder" />
        </table>
        </LayoutTemplate>
        
        <ItemTemplate>
        <tr class="computer">
        <td><img src="Computer.png" /></td>
        <td><%# Eval("Properties['ElementName'].Value") %></td>
        <td><%# DisplayState(Eval("Properties['EnabledState'].Value")) %></td>
        <td><%# DisplayUptime(Eval("Properties['OnTimeInMilliseconds'].Value")) %></td>
        </tr>
        </ItemTemplate>

        <EmptyDataTemplate>
        
            <div>No Virtual Machines Found.</div>
        
        </EmptyDataTemplate>
    </asp:ListView>


</asp:Content>

